package com.fr.data.impl;

import com.fr.base.core.ComparatorUtils;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;

public class DirectoryConnection
  implements Connection
{
  private String location = null;

  public DirectoryConnection()
  {
  }

  public DirectoryConnection(String paramString)
  {
    this.location = paramString;
  }

  public String getLocation()
  {
    return this.location;
  }

  public void setLocation(String paramString)
  {
    this.location = paramString;
  }

  public boolean equals(Object paramObject)
  {
    DirectoryConnection localDirectoryConnection = (DirectoryConnection)paramObject;
    return ComparatorUtils.equals(getLocation(), localDirectoryConnection.getLocation());
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if ((paramXMLableReader.isChildNode()) && ("DirectoryAttr".equals(paramXMLableReader.getTagName())))
    {
      String str;
      if ((str = paramXMLableReader.getAttr("location")) != null)
        this.location = str;
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    paramXMLPrintWriter.startTAG("DirectoryAttr");
    if (this.location != null)
      paramXMLPrintWriter.attr("location", this.location);
    paramXMLPrintWriter.end();
  }

  public Object clone()
    throws CloneNotSupportedException
  {
    return super.clone();
  }
}